package com.zzzyh.aopdemo.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
@Order(1)
public class TestAop2 {
    @Before("@annotation(com.zzzyh.aopdemo.annotation.MyAnnotation)")
    public void doBefore() {
        log.info("doBefore2方法执行");
    }

    @After("@annotation(com.zzzyh.aopdemo.annotation.MyAnnotation)")
    public void dAfter() {
        log.info("After2方法执行");
    }
}
